//
//  RTJDiscoverListCell.m
//  RuiTaiJinProject
//
//  Created by jayson on 2018/11/30.
//  Copyright © 2018年 leewei. All rights reserved.
//

#import "RTJDiscoverListCell.h"

@implementation RTJDiscoverListCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    _bg_view.layer.cornerRadius = 5;
    _bg_view.layer.shadowColor = [UIColor colorForHex:@"#dbc9cc"].CGColor;
    _bg_view.layer.shadowOffset = CGSizeMake(-1, 1);
    _bg_view.layer.shadowOpacity = 0.5;
    _bg_view.layer.shadowRadius = 5;
    
    UIImageView *img = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, screenW*345/375, 155)];
    
    img.image = [UIImage imageNamed:@"banner_dream"];
    [_bg_view addSubview:img];
  

    
    self.imgW.constant = screenW*290/375;
    
    UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:img.bounds byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(5, 5)];
    CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];

    maskLayer.frame = img.bounds;

    maskLayer.path = maskPath.CGPath;

    img.layer.mask = maskLayer;
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
